package shajie.shajun.mmhf.ViewModel;


import java.util.List;
import java.util.Map;

import okhttp3.MultipartBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import shajie.shajun.mmhf.Bean2.OutGoods;
import shajie.shajun.mmhf.Bean2.PostPriceResult;
import shajie.shajun.mmhf.Bean2.Product;
import shajie.shajun.mmhf.Bean2.Result;
import shajie.shajun.mmhf.Bean2.SearchOrder;

/**
 * Created by Administrator on 2016/5/9 0009.
 */
public interface HttpService {
    //登录http://sj476606729.oicp.net:25900/interface.ashx?id=Product
    @GET("interface.ashx")
    Call<List<List<Product>>>getProducts(@Query("id") String id);
    @GET("interface.ashx")
    Call<List<SearchOrder>> getSearchOrder(@Query("id") String id, @Query("Or") String or);
    @GET("interface.ashx")
    Call<List<SearchOrder>> getSearchPerson(@Query("id") String id, @Query("Co") String Co);
    @GET("interface.ashx")
    Call<List<SearchOrder>>getRecentOrder(@Query("id") String id);
   // http://sj476606729.oicp.net:25900/interface.ashx?id=ModifyInventory&In=6&Product=补水洁面乳
    @GET("interface.ashx")
    Call<Result>modifyProductDatabse(@Query("id") String id, @Query("In")String In, @Query("Product") String Product);
   //活动图片http://sj476606729.oicp.net:25900/interface.ashx?id=ActiviteImage
   //发货快照http://sj476606729.oicp.net:25900/interface.ashx?id=Snapshot
    //id=ClearPostPrice
    @GET("interface.ashx")
    Call<Result>getpicture(@Query("id") String id);
    //上传图品http://sj476606729.oicp.net:25900/Ashx/Snapshot.ashx
    @Multipart
    @POST("Ashx/Snapshot.ashx")
    Call<Result> uploadPictures(@Part() MultipartBody.Part  part);
    //发货数据sj476606729.oicp.net:25900/interface.ashx?id=Consignment
    @GET("interface.ashx")
    Call<List<OutGoods>>OutGoods(@Query("id") String id);
    ////修改interface.ashx?id=ModifyConsignment&Key=11&Product=cc霜*2/冰晶凝霜*3&PaidPrice=12&Weight=3&PostPrice=25&Address=江苏&Clear=0&Date=2017-01-28
    //添加发货
   //sj476606729.oicp.net:25900/interface.ashx/interface.ashx?id=AddConsignment&Date=2017-01-03&Product=cc霜*2/冰晶凝霜*3&PaidPrice=12.3&Weight=3&PostPrice=25&Address=江苏
    @GET("interface.ashx")
    Call<Result>addOutGoods(@QueryMap Map<String, String> params);
    //邮费计算interface.ashx?id=PostPrice&Address=湖北&Weight=3
    @GET("API/PostPrice")
    Call<PostPriceResult>postprice(@QueryMap Map<String, String> params);

    //
/*
    //获取用户
    @GET("Operate/alluser")
    Call<List<User>> getUser();

    //获取所有库位
    @GET("Operate/devicePlace")
    Call<List<Place>> getAllPlace();

    //获取所有维修原因
    @GET("Operate/allRepairReason")
    Call<List<ReasonBen>> getAllRepairReason();

    //获取所有报废原因
    @GET("Operate/allScrapReason")
    Call<List<ReasonBen>> getAllScrapReason();

    //保养
    @GET("Operate/keepUp")
    Call<ResponseBody> keepUp(@Query("qrcode") String qrcode, @Query("reason") String reason);

    //入库
    @GET("Operate/putin")
    Call<ResponseBody> putIn(@QueryMap Map<String, String> params);

    //创建警告
    @GET("Operate/createPatrol")
    Call<ResponseBody> createPatrol(@QueryMap Map<String, String> params);

    //解决警告
    @GET("Operate/finishPatrol")
    Call<ResponseBody> finishPatrol(@Query("patrol_id") String id);

    //警告列表
    @GET("Operate/patrolList")
    Call<List<Patrol>> patrolList();


    //巡查设备
    @GET("Operate/inspectDevice")
    Call<Device> inspectDevice(@Query("qrcode") String qrcode);

    //设备详情
    @GET("Operate/getDeviceInfo")
    Call<Device> getDeviceInfo(@Query("qrcode") String qrcode);

    //维修设备
    @GET("Operate/repaire")
    Call<ResponseBody> repaire(@Query("qrcode") String qrcode, @Query("operate_type") String operate_type, @Query("reason") String reason);

    //任务列表
    @GET("Operate/taskList")
    Call<List<Task>> taskList();

    //保养设备列表
    @GET("Operate/keepUpDevices")
    Call<List<KeepTask>> keepTaskList();

    //保养原因列表
    @GET("Operate/allKeepReason")
    Call<List<ReasonBen>> keepReasonList();

    //保养设备信息
    @GET("Operate/getKeepDeviceInfo")
    Call<KeepTask> getKeepDeviceInfo(@Query("qrcode") String qrcode);

    //任务数量
    @GET("Operate/numberOfTask")
    Call<Map<String,String>> numberOfTask();

    //任务详细
    @GET("Operate/taskDetail")
    Call<TaskDetail> taskDetail(@Query("id") String id);

    //开始盘点
    @GET("Operate/beginTask")
    Call<Map<String,String>> beginTask(@Query("id") String place_id);

    //结束盘点
    @GET("Operate/finishTask")
    Call<ResponseBody> finishTask(@Query("id") String task_id);

    //盘点
    @GET("Operate/checkDevice")
    Call<ResponseBody> checkDevice(@Query("place_id") String place_id, @Query("task_id") String taskid, @Query("qr_code") String qr_code);*/


}
